﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using BL;
using BE;


namespace UI.Tesoreria
{
    /// <summary>
    /// Summary description for WebService1
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class WebService1 : System.Web.Services.WebService
    {

        [WebMethod]
        public List<string> Comprobantes(string prefixText, int count) 
        {
            List<string> lista = new List<String>();

            ComprobanteVenta_BL cpb = new ComprobanteVenta_BL();

            List<ConceptoTesoreria>  listacps=cpb.ObtenerConceptos();

            foreach (ConceptoTesoreria item in listacps)
            {
                lista.Add(item.Nombre);
            }

            return lista;


        }

        [WebMethod]
        public string[] Personas(string prefixText, int count)
        {
            
            List<string> lista = new List<String>();
            ComprobanteVenta_BL cpb = new ComprobanteVenta_BL();
            List<ConceptoTesoreria> listacps = cpb.ObtenerConceptos();

            string[] fulltext=new String[listacps.Count];

            foreach (ConceptoTesoreria item in listacps)
            {
               
                lista.Add(item.Nombre);
            }

            fulltext=lista.ToArray();

            return fulltext;
        }


       



    }
}
